<?php
/**
 * Tên file mình có thể tự chọn nhưng nên đặc theo têm controller sẽ dễ quản lý
 */

/**
 * Tên class: Example_Models_Interface_Example(Tenmodule_Models_Interface_Tenfile)
 */

interface Enterprise_Models_Interface_User
{
    /**
    * Get role by name
    *
    * @param int $name Name of Role
    * @return Core_Models_Role
    */
    public function getRoleByName($name);

    /**
    * Add new enterprise user account
    *
    * @param Enterprise_Models_User $user
    * @return int
    */
    public function add($user);

    /**
    * Get enterprise user account by given Id
    *
    * @param int $id Enterprise id of user account
    * @return Tomato_Model_RecordSet
    */
    public function getById($id);

    /**
    * Get enterprise user account by given Id
    *
    * @param int $enterprise_id Enterprise id of user account
    * @return Tomato_Model_RecordSet
    */
    public function getUserAccountBy($enterprise_id);

    /**
     * Get enterprise id by user id
     * @param int $user_id id of Core_user
     * @return Enterprise_Models_User
     */
    public function getByUser($user_id);
}
